
package x.trident.core.micro.api.exception.enums;


import x.trident.core.micro.api.constants.MicroConstants;
import x.trident.core.constants.BaseConstants;
import x.trident.core.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 签名异常
 *
 * @author Seven
 * @date 2018-01-05 14:48
 */
@Getter
public enum GatewayExceptionEnum implements AbstractExceptionEnum {

    /**
     * 网关未知异常
     */
    GATEWAY_ERROR(BaseConstants.BUSINESS_ERROR_TYPE_CODE + MicroConstants.MICRO_EXCEPTION_STEP_CODE + "91", "网关未知异常，具体信息：{}"),

    /**
     * 请求资源不存在
     */
    CACHE_URL_NULL(BaseConstants.BUSINESS_ERROR_TYPE_CODE + MicroConstants.MICRO_EXCEPTION_STEP_CODE + "92", "请求资源不存在，请检查资源缓存是否有相应url的规则");

    /**
     * 错误编码
     */
    private final String errorCode;

    /**
     * 提示用户信息
     */
    private final String userTip;

    GatewayExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}
